#include "startinterface.h"
#include "roominterface.h"
#include "playinterface.h"
#include <QApplication>
#include <QObject>
#include <QPropertyAnimation>

void Connect(startinterface *,roominterface *,playinterface *);

int main(int argc, char *argv[])
{
    qputenv("QT_SCALE_FACTOR", "2");

    QApplication a(argc, argv);

    startinterface _startinterface;
    roominterface _roominterface;
    playinterface _playinterface;

    Connect(&_startinterface,&_roominterface,&_playinterface);

    _playinterface.show();

    return a.exec();
}

void Connect(startinterface * _startinterface,
             roominterface * _roominterface,
             playinterface * _playinterface){
    QObject::connect(_startinterface->singlegame,SIGNAL(clicked()),
            _startinterface,SLOT(close()));
    QObject::connect(_startinterface->onlinegame,SIGNAL(clicked()),
            _startinterface,SLOT(close()));
    QObject::connect(_startinterface->singlegame,SIGNAL(clicked()),
            _roominterface,SLOT(show()));
    QObject::connect(_startinterface->onlinegame,SIGNAL(clicked()),
            _roominterface,SLOT(show()));
    QObject::connect(_roominterface->startgame,SIGNAL(clicked()),
            _roominterface,SLOT(close()));
    QObject::connect(_roominterface->startgame,SIGNAL(clicked()),
            _playinterface,SLOT(show()));
}
